<template>
  <Modal v-model="cancelTip" class-name="vertical-center-modal" width="500" :mask-closable="false" :closable="false">
    <div slot="header" class="pop-head">
      <div class="pop-tit">{{ $t('user.cancelOrder') }}</div>
      <Icon type="md-close" size="26" color="#242424" class="close" @click="cancelBtn" />
    </div>
    <div class="tip-bg">
      <Icon type="md-information-circle" size="18" color="#FF186B" class="tip" />
      <div class="text">{{ $t('user.coupon_cancel_tip') }}</div>
    </div>
    <div slot="footer" class="pop-footer">
      <div></div>
      <div class="handle-sty">
        <div class="handle-btn" @click="cancelBtn()">{{ $t('user.cancel_btn_text') }}</div>
        <div class="handle-btn confirm-btn" @click="confirmBtn()">{{ $t('personal.Search-confirm') }}</div>
      </div>
    </div>
  </Modal>
</template>

<script>
export default {
  data() {
    return {
      cancelTip: false
    }
  },
  methods: {
    open() {
      this.cancelTip = true;
    },
    cancelBtn() {
      this.cancelTip = false;
    },
    confirmBtn() {
      this.$emit('confirmMet');
      this.cancelTip = false;
    }
  }
}
</script>

<style scoped lang="less">
:deep(.ivu-modal-content) {
  border-radius: 12px;

  .ivu-modal-header {
    border: none;
    padding: 0;
  }

  .ivu-modal-body {
    padding: 0 32px;
  }

  .ivu-modal-footer {
    padding: 32px;
    border: none;
  }
}

.vertical-center-modal {
  display: flex;
  align-items: center;
  justify-content: center;

  .pop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 32px;
    padding: 32px 0 20px 0;

    .pop-tit {
      font-family: PingFang SC, PingFang SC;
      font-weight: 600;
      font-size: 24px;
      color: #1E1714;
      line-height: 28px;
    }

    .close {
      cursor: pointer;
    }
  }

  .tip-bg {
    padding: 12px;
    background: #FFEEF4;
    border-radius: 4px 4px 4px 4px;
    display: flex;
    align-items: start;
    gap: 10px;

    .tip {
      height: 19px;
    }

    .text {
      font-weight: 500;
      font-size: 16px;
      color: #FF186B;
      line-height: 21px;
    }
  }

  .pop-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    .handle-sty {
      display: flex;
      align-items: center;
      gap: 24px;

      .handle-btn {
        min-width: 112px;
        padding: 12px 16px;
        border-radius: 8px 8px 8px 8px;
        border: 1px solid #E5E5E5;
        font-weight: 600;
        font-size: 16px;
        color: #1E1714;
        line-height: 19px;
        text-align: center;
        cursor: pointer;
      }

      .confirm-btn {
        background-color: #FF186B;
        color: #FFFFFF;
      }
    }
  }
}
</style>